Sandbox the global git config in git-lfs specs - #762
Open
mokagio wants to merge 2 commits into
Open
Conversation
`git lfs install` and `git lfs uninstall` default to the global scope, so these two examples were writing to — and then deleting — the `[filter "lfs"]` section of the developer's real `~/.gitconfig` on every run of the suite. Passing `--local` would not have been enough: `has_git_lfs?` reads every config scope, so the negative example would start failing on any machine that legitimately has global git-lfs filters configured. Pointing `GIT_CONFIG_GLOBAL` at a throwaway file keeps both examples exercising the same code path while confining the writes. --- Generated with the help of Claude Code, https://claude.ai/code Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
--- Generated with the help of Claude Code, https://claude.ai/code Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
mokagio
enabled auto-merge
July 30, 2026 01:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
My global
.gitconfig, which I manage via a Git-tracked dotfiles repo, kept showing the LFS block removed and I couldn't understand why.Asked Opus 5 and it quickly figured out the reason was the
release-toolkitLFS tests. This PR sandboxs them so they don't modify the global Git configurations.